Skip to content

feat(material/core): add mixins for Material Design typography#32959

Merged
andrewseguin merged 1 commit intoangular:mainfrom
mikzat:main
Mar 23, 2026
Merged

feat(material/core): add mixins for Material Design typography#32959
andrewseguin merged 1 commit intoangular:mainfrom
mikzat:main

Conversation

@mikzat
Copy link
Contributor

@mikzat mikzat commented Mar 20, 2026

Angular provides CSS system variables for Material typography, but the variable for "font" is not able to set letter-spacing, which requires users to remember to set letter-spacing separately:

  .mat-font-body-sm {
    font: var(--mat-sys-body-small);
    letter-spacing: var(--mat-sys-body-small-tracking);
  }

This change introduces typography mixins that ensure that both properties are set together, so the above snippet becomes:

  .mat-font-body-sm {
    @include typography.body-small();
  }

End-users can apply these mixins from the mat. entrypoint with a typography- prefix:

  .mat-font-body-sm {
    @include mat.typography-body-small();
  }

@pullapprove pullapprove bot requested review from crisbeto and ok7sai March 20, 2026 22:26
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: material/core labels Mar 20, 2026
@andrewseguin andrewseguin added target: major This PR is targeted for the next major release dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase labels Mar 20, 2026
@ok7sai ok7sai requested a review from andrewseguin March 20, 2026 22:35
@github-actions
Copy link

Deployed dev-app for 8d3ba6c to: https://ng-dev-previews-comp--pr-angular-components-32959-dev-w27na8v1.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@github-actions
Copy link

Deployed docs-preview for 8d3ba6c to: https://ng-dev-previews-comp--pr-angular-components-32959-docs-9y7jc320.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Mar 23, 2026
@andrewseguin andrewseguin merged commit a46b0a1 into angular:main Mar 23, 2026
9 of 12 checks passed
@andrewseguin
Copy link
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: material/core detected: feature PR contains a feature commit dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants